<template>
  <div class="successWrap">
    <img src="@/assets/images/paySuccess.png">
    <p>秒杀成功！</p>
    <router-link :to="{path:'/seckill',query:{type:'2'}}">
      <button>查看我的商品</button>
    </router-link>

  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  created() {
    //  解决整个页面背景色，换页面会连带的bug
    document
      .querySelector('body')
      .setAttribute('style', 'background-color: #ffffff');
  },
  // 解决跳第二页面，会出现背景图的情况
  beforeDestroy() {
    document
      .querySelector('body')
      .removeAttribute('style', 'background-color: #ffffff');
  }
};
</script>
<style lang="scss" scoped>
.successWrap {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  img {
    width: 2.16rem;
    height: 2.16rem;
    margin-top: 2rem;
  }
  p {
    font-size: 0.67rem;
    color: #333333;
    font-family: PingFang-SC-Medium;
    margin-top: 0.79rem;
  }
  button {
    width: 9.2rem;
    height: 1.17rem;
    background-color: #fa1c1c;
    border-radius: 0.11rem;
    border: none;
    font-size: 0.43rem;
    color: #ffffff;
    margin-top: 1.27rem;
    letter-spacing: 0.03rem;
  }
}
</style>
